const baseUrl = "http://60.191.155.42:803/api";
//const baseUrl = "http://202.136.214.173/api";

const Urls = {
    //登录
    loginUrl: baseUrl + "/Login",
    //获取菜单
    menuUrl: baseUrl + "/GetMean",
    //进口计划
    jkjhUrl: baseUrl + "/V_SHORT_INPLAN",
    //出口计划
    ckjhUrl: baseUrl + "/V_SHORT_OUTPLAN",
    // 移泊计划
    ybjhUrl: baseUrl + "/V_SHORT_MOVEPLAN",
    //重要公告
    zyggUrl: baseUrl + "/T_CODE_NOTICE",
    // 船况记录
    ckjlUrl: "http://202.136.214.173/api" + "/v_ship_boatrecord",
    //潮汐数据
    cxsjUrl: baseUrl + "/TIDE",
    //码头泊位
    mtbwUrl: baseUrl + "/v_dock",
    //拖轮信息
    tlxxUrl: baseUrl + "/v_tugboat",
    //文件下载
    downloadUrl: "http://60.191.155.42:803/upfile/",
    //气象数据
    qxsjUrl: baseUrl + "/WEATHER",
    //值班情况
    zbqkUrl: baseUrl + "/v_pilotondutytable",
    //引航员工分
    yhygfUrl: baseUrl + "/v_yhygf",
    //引航员确认
    yhyqrUrl: baseUrl + "/v_yhyqr",
    //引航员记事
    yhyjsUrl: baseUrl + "/PilotRecord",
    //签证单录入
    qzdlrUrl: baseUrl + "/Pilotvisa",
    //获取地点
    locationUrl: "http://60.191.155.42:803/GetSelectData/Get?FieldName=MDLX",
    //引航员确认
    yhyqrUrl: baseUrl + "/v_yhyqr",
    //全部计划
    alljhUrl: baseUrl + "/V_SHORT_ALLPLAN",
};

export function getRealUrl(url, map) {
    let result = url + "?";
    for (let [key, value] of map) {
        result = result + key + "=" + value + "&"
    }
    return result;
}

export function postRealUrl(url, map) {
    let result = url + "?";
    for (let [key, value] of map) {
        result = result + key + "=" + value + "&"
    }
    return result;
}

export default Urls;
